#include "TwOgreSeparatorVariable.h"

#include "TwOgreWindow.h"

namespace TwOgre{
	SeparatorVariable::SeparatorVariable(Window* parent, const Ogre::String& name, const Ogre::String& groupName)
        : Variable(parent, name, TW_TYPE_UNDEF)
    {
        TwAddSeparator(parent->getTweakBar(), name.c_str(), "");
		if(groupName.compare("") != 0)
		{
			setGroup(groupName);
		}
    }
	
	SeparatorVariable::SeparatorVariable(SeparatorParams& params) :
        Variable(params.parent_, params.name_, params.type_)
    {
        TwAddSeparator(params.parent_->getTweakBar(), params.name_.c_str(), "");
        if(params.group_.compare("") != 0)
		{
            setGroup(params.group_);
		}
    }
    
    SeparatorVariable::~SeparatorVariable()
    {
        TwRemoveVar(mParent->getTweakBar(), mName.c_str());
    }
	
}; // End Namespace